package com.yonyou.cyxdms.sysAuth.service.dto.notification;

import com.yonyou.cyx.framework.bean.entity.base.BasePO;
import com.yonyou.cyx.function.utils.bean.BeanMapperUtil;
import com.yonyou.cyxdms.framework.bean.dto.base.DMSBaseDTO;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 通知通告信息包含关联表
 * </p>
 *
 * @author chengliang
 * @since 2019-09-11
 */

public class NotificationInfoDTO extends DMSBaseDTO implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 通知ID
     */
    private Long notificationId;


    /**
     * 通知主题 通告主题
     */
    private String notificationTitle;
    private Integer orgId;

    private String appId;

    /**
     * 通告类型 通告类别
     */
    private Integer notificationType;


    /**
     * 通知正文
     */
    private String notificationContent;


    /**
     * 紧急程度
     */
    private Integer urgency;


    /**
     * 通知通告有效开始时间
     */
    private String startTime;


    /**
     * 通知通告有效结束时间
     */
    private String endTime;


    /**
     * 是否全网发布
     */
    private Integer isAll;


    /**
     * 状态（已保存，已发布）
     */
    private Integer status;


    /**
     * 发布人
     */
    private String publishPerson;


    /**
     * 发布部门ID 发布部门
     */
    private Long publishOrgId;

    /**
     * 数据来源（厂家、经销商）
     */
    private Long dataType;

    /**
     * 发布时间
     */
    private String publishDate;


    /**
     * 下发经销商角色列表
     */
    private List<NotificationDealerRoleListDTO> listDealerRole;

    /**
     * 下发经销商列表
     */
    private List<NotificationDealerListDTO> listDealer;

    /**
     * 下发角色类别列表
     */
    private List<NotificationOemRoleListDTO> listOemRole;

    /**
     * 附件保存
     */
    private String fileUrl;
    private String fileName;

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Integer getOrgId() {
        return orgId;
    }

    public void setOrgId(Integer orgId) {
        this.orgId = orgId;
    }

    public void setUrgency(Integer urgency) {
        this.urgency = urgency;
    }

    public String getAppId() {
        return appId;
    }

    public void setAppId(String appId) {
        this.appId = appId;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }

    public Long getDataType() {
        return dataType;
    }

    public void setDataType(Long dataType) {
        this.dataType = dataType;
    }

    public String getStartTime() {
        return startTime;
    }

    public void setStartTime(String startTime) {
        this.startTime = startTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public String getPublishDate() {
        return publishDate;
    }

    public void setPublishDate(String publishDate) {
        this.publishDate = publishDate;
    }

    public NotificationInfoDTO() {
        super();
    }

    public Long getNotificationId() {
        return notificationId;
    }

    public void setNotificationId(Long notificationId) {
        this.notificationId = notificationId;
    }

    public String getNotificationTitle() {
        return notificationTitle;
    }

    public void setNotificationTitle(String notificationTitle) {
        this.notificationTitle = notificationTitle;
    }

    public Integer getNotificationType() {
        return notificationType;
    }

    public void setNotificationType(Integer notificationType) {
        this.notificationType = notificationType;
    }

    public String getNotificationContent() {
        return notificationContent;
    }

    public void setNotificationContent(String notificationContent) {
        this.notificationContent = notificationContent;
    }

    public Integer getUrgency() {
        return urgency;
    }


    public Integer getIsAll() {
        return isAll;
    }

    public void setIsAll(Integer isAll) {
        this.isAll = isAll;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public String getPublishPerson() {
        return publishPerson;
    }

    public void setPublishPerson(String publishPerson) {
        this.publishPerson = publishPerson;
    }

    public Long getPublishOrgId() {
        return publishOrgId;
    }

    public void setPublishOrgId(Long publishOrgId) {
        this.publishOrgId = publishOrgId;
    }


    public List<NotificationDealerListDTO> getListDealer() {
        return listDealer;
    }

    public void setListDealer(List<NotificationDealerListDTO> listDealer) {
        this.listDealer = listDealer;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public List<NotificationDealerRoleListDTO> getListDealerRole() {
        return listDealerRole;
    }

    public void setListDealerRole(List<NotificationDealerRoleListDTO> listDealerRole) {
        this.listDealerRole = listDealerRole;
    }

    public List<NotificationOemRoleListDTO> getListOemRole() {
        return listOemRole;
    }

    public void setListOemRole(List<NotificationOemRoleListDTO> listOemRole) {
        this.listOemRole = listOemRole;
    }

    @Override
    public String toString() {
        return "NotificationInfoDTO{" +
                "notificationId=" + notificationId +
                ", notificationTitle='" + notificationTitle + '\'' +
                ", orgId=" + orgId +
                ", appId='" + appId + '\'' +
                ", notificationType=" + notificationType +
                ", notificationContent='" + notificationContent + '\'' +
                ", urgency=" + urgency +
                ", startTime='" + startTime + '\'' +
                ", endTime='" + endTime + '\'' +
                ", isAll=" + isAll +
                ", status=" + status +
                ", publishPerson='" + publishPerson + '\'' +
                ", publishOrgId=" + publishOrgId +
                ", dataType=" + dataType +
                ", publishDate='" + publishDate + '\'' +
                ", listDealerRole=" + listDealerRole +
                ", listDealer=" + listDealer +
                ", listOemRole=" + listOemRole +
                ", fileUrl='" + fileUrl + '\'' +
                ", fileName='" + fileName + '\'' +
                '}';
    }

    /**
     * 将DTO 转换为PO
     * //对某个对象属性进行赋值
     * //BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param poClass dto 需要转换的dto
     * @author chengliang
     * @since 2019-09-11
     */
    @Override
    public <T extends BasePO> T transDtoToPo(Class<T> poClass) {
        return super.transDtoToPo(poClass);
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param po 需要转换的对象
     * @author chengliang
     * @since 2019-09-11
     */
    public <T extends BasePO> void transDtoToPo(T po) {
        BeanMapperUtil.copyProperties(this, po, "notificationId");
    }

    /**
     * 将DTO 转换为PO
     * BeanMapperUtil.populateValueByMethod(transPO,"setXxx",this.getXxx);
     *
     * @param po 需要转换的对象
     * @author chengliang
     * @since 2019-09-11
     */
    public <T extends BasePO> void transDtoToPoforIngore(T po, String... ignoreProperties) {
        BeanMapperUtil.copyProperties(this, po, ignoreProperties);
    }

}
